<template>
    <div class="wrapper record">
        <mt-header :title="selected=='1'?'提现记录':'充值记录'" mtClass="no-bg" />
        <div class="tabbar">
            <mt-navbar v-model="selected">
                <mt-tab-item id="1">提现记录</mt-tab-item>
                <mt-tab-item id="2">充值记录</mt-tab-item>
            </mt-navbar>
        </div>
        <div class="tab-container">
            <mt-tab-container v-model="selected">
                <mt-tab-container-item id="1">
                    <!-- 提现记录 -->
                    <RecordList :type="'1'"></RecordList>
                </mt-tab-container-item>
                <mt-tab-container-item id="2">
                    <!-- 充值记录 -->
                    <RecordList :type="'2'"></RecordList>
                </mt-tab-container-item>
            </mt-tab-container>
        </div>
    </div>
</template>

<script>
import mtHeader from "@/components/Header"
import RecordList from "@/components/RecordList"
export default {
    data() {
        return {
            selected:'1'
        };
    },
    components:{
        mtHeader,
        RecordList
    },
    mounted(){
        this.selected = this.$route.query.type || '1';
    }
};
</script>

<style lang="stylus" scoped>
.wrapper{
    height:100%;
    overflow:scroll;
    .tabbar{
        position: absolute;
        top:50px;
        left:0;
        right:0;
        background: #fff;
        z-index: 1;
    }
}
</style>